package com.unknowpupil.design.sigleton;

/**
 * @Description: <br/>
 * <p>
 *
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/24 17:19
 * @Classname: TestSingleton
 * @Version: 1.0
 */
public class TestSingleton {
    public static void main(final String[] args) throws InterruptedException {
        for (int i = 1; i <= 100000; i++) {
            final Thread t1 = new Thread(new ThreadSingleton());
            System.out.println("thread "+i);
            t1.setName("thread" + i);
            t1.start();
        }
    }

    public static class ThreadSingleton implements Runnable {
        @Override
        public void run() {
            CheckLockSingleton.getInstance();
        }
    }
}
